from api.login_api import LoginAPI
from api.course_api import courseAPI

# 创建测试类
class TestContractBusiness:

    def setup_method(self):
        self.login_api = LoginAPI()
        self.course_api = courseAPI()


    def teardown_method(self):
        pass

    def test_login_success(self):
        res_v=self.login_api.verify()
        print(res_v.status_code)
        print(res_v.json())
        print(res_v.json().get("uuid"))

        login_data = {
            "username":"admin",
            "password":"HM_2023_test",
            "code":"2",
            "uuid":res_v.json().get("uuid")
        }

        res_l=self.login_api.login(login_data)
        print(res_l.status_code)
        print(res_l.json())






